package com.bjc.gmall.service;

import com.bjc.gmall.bean.UserAddress;


import java.util.List;

/**
 * @program: dubbo-study
 * @description: 本地存根
 * @author: bjc
 * @create: 2020-07-19 17:32
 */
public class UserServiceStub implements UserService {

    private final UserService userService;

    /**
     * 传入的是userService的远程代理对象
     * @param userService
     */
    public UserServiceStub(UserService userService) {
        this.userService = userService;
    }

    @Override
    public List<UserAddress> getUserAddressList(String userId) {
        System.out.println("UserServiceStub......");
        if(!"".equals(userId)){
            return userService.getUserAddressList(userId);
        }
        return null;
    }
}
